  /**
   * Generate time : 2016-04-27 14:08:31
   * Version : 1.0.1.V20070717
   */
package com.baosight.sczx.zm.cn.domain;

import com.baosight.iplat4j.util.NumberUtils;

import java.math.BigDecimal;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;

import java.util.HashMap;
import java.util.Map;

import com.baosight.iplat4j.util.StringUtils;
/**
 * ZMCNStock 
 * table comment : 库存数据 
 */
public class ZMCNStock extends DaoEPBase {

	private String fdKeyId = " ";		/* 主键*/
	private String fdStatus = "草拟";		/* 状态*/
	private String fdVirtualDate = " ";		/* 调度日期 在煤坪转移台帐中该字段被用来记录上报时间*/
	private String fdCurrentDate = " ";		/* 当前日期*/
	private String fdYear = " ";		/* 年份*/
	private String fdMonth = " ";		/* 月份*/
	private BigDecimal fdStockValue = new BigDecimal("0");		/* 账面库存量*/
	private String fdStockPalce = " ";		/* 存放地点*/
	private BigDecimal fdStockACtual = new BigDecimal("0");		/* 报调度库存量*/
	private BigDecimal fdStockIn = new BigDecimal("0");		/* 进煤量*/
	private BigDecimal fdStockOut = new BigDecimal("0");		/* 出煤量*/
	private String fdMoveType=" ";/*转移方式*/
	private String fdDepartmentId=" ";/*单位id*/
	private String fdDepartment=" ";/*单位*/
	private BigDecimal fdStockMaoertuo = new BigDecimal("0");		/* 猫儿沱库存*/
	private String fdRemark = " ";		/* 备注*/
	private BigDecimal fdStock = new BigDecimal("0");		/* 实际库存*/
	private String fdMiningId = " ";		/* 主键*/

	/**
	 * initialize the metadata 
	 */
	public void initMetaData() {
		EiColumn eiColumn;
		
	eiColumn = new EiColumn("fdKeyId");
	eiColumn.setPrimaryKey(true);
	eiColumn.setFieldLength(32);	
	eiColumn.setDescName("主键");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdStatus");
	eiColumn.setFieldLength(4);	
	eiColumn.setDescName("状态");
	eiMetadata.addMeta(eiColumn);

	eiColumn = new EiColumn("fdVirtualDate");
	eiColumn.setFieldLength(10);	
	eiColumn.setDescName("调度日期");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdCurrentDate");
	eiColumn.setFieldLength(10);	
	eiColumn.setDescName("当前日期");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdYear");
	eiColumn.setFieldLength(4);	
	eiColumn.setDescName("年份");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdMonth");
	eiColumn.setFieldLength(2);	
	eiColumn.setDescName("月份");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdStockValue");
	eiColumn.setType("N");
	eiColumn.setScaleLength(0);
	eiColumn.setFieldLength(20);
	eiColumn.setDescName("账面库存量");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdStockPalce");
	eiColumn.setFieldLength(100);	
	eiColumn.setDescName("存放地点");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdStockACtual");
	eiColumn.setType("N");
	eiColumn.setScaleLength(0);
	eiColumn.setFieldLength(20);
	eiColumn.setDescName("报总调度库存量");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdStockIn");
	eiColumn.setType("N");
	eiColumn.setScaleLength(0);
	eiColumn.setFieldLength(20);
	eiColumn.setDescName("进煤量");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdStockOut");
	eiColumn.setType("N");
	eiColumn.setScaleLength(0);
	eiColumn.setFieldLength(20);
	eiColumn.setDescName("出煤量");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdStockOut");
	eiColumn.setType("N");
	eiColumn.setScaleLength(0);
	eiColumn.setFieldLength(20);
	eiColumn.setDescName("出煤量");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdMoveType");
	eiColumn.setType("N");
	eiColumn.setFieldLength(4);
	eiColumn.setDescName("转移方式");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdDepartmentId");
	eiColumn.setFieldLength(32);	
	eiColumn.setDescName("单位id");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdDepartment");
	eiColumn.setFieldLength(50);	
	eiColumn.setDescName("单位");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdStockMaoertuo");
	eiColumn.setType("N");
	eiColumn.setScaleLength(0);
	eiColumn.setFieldLength(20);
	eiColumn.setDescName("猫儿沱库存");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdRemark");
	eiColumn.setFieldLength(200);	
	eiColumn.setDescName("备注");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdStock");
	eiColumn.setType("N");
	eiColumn.setScaleLength(0);
	eiColumn.setFieldLength(20);
	eiColumn.setDescName("实际库存");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdMiningId");
	eiColumn.setFieldLength(32);	
	eiColumn.setDescName("矿");
	eiMetadata.addMeta(eiColumn);
	}
	/**
	 * the constructor
	 */
	public ZMCNStock() {
		initMetaData();
	}
	
	/**
	 * get the fdKeyId - 主键
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}
	
	/**
	 * set the fdKeyId - 主键
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}
	
	/**
	 * get the fdKeyId - 主键
	 * @return the fdKeyId
	 */
	public String getFdMiningId() {
		return this.fdMiningId;
	}
	
	/**
	 * set the fdKeyId - 主键
	 */
	public void setFdMiningId(String FdMiningId) {
		this.fdMiningId = FdMiningId;
	}
	
	/**
	 * get the fdVirtualDate - 调度日期
	 * @return the fdVirtualDate
	 */
	public String getFdVirtualDate() {
		return this.fdVirtualDate;
	}
	
	/**
	 * set the fdVirtualDate - 调度日期
	 */
	public void setFdVirtualDate(String fdVirtualDate) {
		this.fdVirtualDate = fdVirtualDate;
	}
	/**
	 * get the fdCurrentDate - 当前日期
	 * @return the fdCurrentDate
	 */
	public String getFdCurrentDate() {
		return this.fdCurrentDate;
	}
	
	/**
	 * set the fdCurrentDate - 当前日期
	 */
	public void setFdCurrentDate(String fdCurrentDate) {
		this.fdCurrentDate = fdCurrentDate;
	}
	/**
	 * get the fdYear - 年份
	 * @return the fdYear
	 */
	public String getFdYear() {
		return this.fdYear;
	}
	
	/**
	 * set the fdYear - 年份
	 */
	public void setFdYear(String fdYear) {
		this.fdYear = fdYear;
	}
	/**
	 * get the fdMonth - 月份
	 * @return the fdMonth
	 */
	public String getFdMonth() {
		return this.fdMonth;
	}
	
	/**
	 * set the fdMonth - 月份
	 */
	public void setFdMonth(String fdMonth) {
		this.fdMonth = fdMonth;
	}
	/**
	 * get the fdStockValue - 库存量
	 * @return the fdStockValue
	 */
	public BigDecimal getFdStockValue() {
		return this.fdStockValue;
	}
	
	/**
	 * set the fdStockValue - 库存量
	 */
	public void setFdStockValue(BigDecimal fdStockValue) {
		this.fdStockValue = fdStockValue;
	}
	/**
	 * get the fdStockPalce - 存放地点
	 * @return the fdStockPalce
	 */
	public String getFdStockPalce() {
		return this.fdStockPalce;
	}
	
	/**
	 * set the fdStockPalce - 存放地点
	 */
	public void setFdStockPalce(String fdStockPalce) {
		this.fdStockPalce = fdStockPalce;
	}
	
	/**
	 * get the fdStockACtual - 报总调度库存量
	 * @return the fdStockACtual
	 */
	public BigDecimal getFdStockACtual() {
		return this.fdStockACtual;
	}
	
	/**
	 * set the fdStockACtual - 报总调度库存量
	 */
	public void setFdStockACtual(BigDecimal fdStockACtual) {
		this.fdStockACtual = fdStockACtual;
	}
	
	/**
	 * get the fdStockIn - 进煤量
	 * @return the fdStockIn
	 */
	public BigDecimal getFdStockIn() {
		return this.fdStockIn;
	}
	
	/**
	 * set the fdStockIn - 进煤量
	 */
	public void setFdStockIn(BigDecimal fdStockIn) {
		this.fdStockIn = fdStockIn;
	}
	
	/**
	 * get the fdStockOut - 出煤量
	 * @return the fdStockOut
	 */
	public BigDecimal getFdStockOut() {
		return this.fdStockOut;
	}
	
	/**
	 * set the fdStockOut - 出煤量
	 */
	public void setFdStockOut(BigDecimal fdStockOut) {
		this.fdStockOut = fdStockOut;
	}
	
	/**
	 * get the fdDepartmentId - 单位id
	 * @return the fdDepartmentId
	 */
	public String getFdDepartmentId() {
		return this.fdDepartmentId;
	}
	
	/**
	 * set the fdDepartmentId - 单位id
	 */
	public void setFdDepartmentId(String fdDepartmentId) {
		this.fdDepartmentId = fdDepartmentId;
	}
	
	/**
	 * get the fdDepartment - 单位
	 * @return the fdDepartment
	 */
	public String getFdDepartment() {
		return this.fdDepartment;
	}
	
	/**
	 * set the fdDepartment - 单位
	 */
	public void setFdDepartment(String fdDepartment) {
		this.fdDepartment = fdDepartment;
	}

	/**
	 * get the fdMoveType - 转移方式
	 * @return the fdMoveType
	 */
	public String getFdMoveType() {
		return this.fdMoveType;
	}
	
	/**
	 * set the fdMoveType - 转移方式
	 */
	public void setFdMoveType(String fdMoveType) {
		this.fdMoveType = fdMoveType;
	}
	
	/**
	 * get the fdStatus - 状态
	 * @return the fdStatus
	 */
	public String getFdStatus() {
		return this.fdStatus;
	}
	
	/**
	 * set the fdStatus - 状态
	 */
	public void setFdStatus(String fdStatus) {
		this.fdStatus = fdStatus;
	}
	
	/**
	 * get the fdStockMaoertuo - 猫儿沱库存
	 * @return the fdStockMaoertuo
	 */
	public BigDecimal getFdStockMaoertuo() {
		return this.fdStockMaoertuo;
	}
	
	/**
	 * set the fdStockMaoertuo - 猫儿沱库存
	 */
	public void setFdStockMaoertuo(BigDecimal fdStockMaoertuo) {
		this.fdStockMaoertuo = fdStockMaoertuo;
	}
	
	/**
	 * get the fdRemark - 备注
	 * @return the fdRemark
	 */
	public String getFdRemark() {
		return this.fdRemark;
	}
	
	/**
	 * set the fdRemark - 备注
	 */
	public void setFdRemark(String fdRemark) {
		this.fdRemark = fdRemark;
	}
	
	/**
	 * get the fdStock - 实际库存
	 * @return the fdStock
	 */
	public BigDecimal getFdStock() {
		return this.fdStock;
	}
	
	/**
	 * set the fdStock - 实际库存
	 */
	public void setFdStock(BigDecimal fdStock) {
		this.fdStock = fdStock;
	}
	/**
	 * get the value from Map
	 */
	public void fromMap(Map map) {
	
		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdVirtualDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdVirtualDate")), fdVirtualDate));
		setFdCurrentDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdCurrentDate")), fdCurrentDate));
		setFdYear(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdYear")), fdYear));
		setFdMonth(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMonth")), fdMonth));
		setFdStockValue(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdStockValue")), fdStockValue));
		setFdStockPalce(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStockPalce")), fdStockPalce));
		setFdStockACtual(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdStockACtual")), fdStockACtual));
		setFdMiningId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMiningId")), fdMiningId));
		
		setFdStockIn(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdStockIn")), fdStockIn));
		setFdStockOut(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdStockOut")), fdStockOut));
		setFdDepartmentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDepartmentId")), fdDepartmentId));
		setFdDepartment(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDepartment")), fdDepartment));
		setFdMoveType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMoveType")), fdMoveType));
		setFdStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStatus")), fdStatus));
		setFdStockMaoertuo(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdStockMaoertuo")), fdStockMaoertuo));
		setFdRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRemark")), fdRemark));
		setFdStock(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdStock")), fdStock));

	}
	
	/**
	 * set the value to Map
	 */
	public Map toMap() {
		
		Map map = new HashMap();
			map.put("fdKeyId",StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));	
			map.put("fdVirtualDate",StringUtils.toString(fdVirtualDate, eiMetadata.getMeta("fdVirtualDate")));	
			map.put("fdCurrentDate",StringUtils.toString(fdCurrentDate, eiMetadata.getMeta("fdCurrentDate")));	
			map.put("fdYear",StringUtils.toString(fdYear, eiMetadata.getMeta("fdYear")));	
			map.put("fdMonth",StringUtils.toString(fdMonth, eiMetadata.getMeta("fdMonth")));	
			map.put("fdStockValue",StringUtils.toString(fdStockValue, eiMetadata.getMeta("fdStockValue")));	
			map.put("fdStockPalce",StringUtils.toString(fdStockPalce, eiMetadata.getMeta("fdStockPalce")));	
			map.put("fdStockACtual",StringUtils.toString(fdStockACtual, eiMetadata.getMeta("fdStockACtual")));
			map.put("fdMiningId",StringUtils.toString(fdMiningId, eiMetadata.getMeta("fdMiningId")));
			
			
			
			map.put("fdStockIn",StringUtils.toString(fdStockIn, eiMetadata.getMeta("fdStockIn")));	
			map.put("fdStockOut",StringUtils.toString(fdStockOut, eiMetadata.getMeta("fdStockOut")));	
			map.put("fdDepartmentId",StringUtils.toString(fdDepartmentId, eiMetadata.getMeta("fdDepartmentId")));	
			map.put("fdDepartment",StringUtils.toString(fdDepartment, eiMetadata.getMeta("fdDepartment")));	
			map.put("fdMoveType",StringUtils.toString(fdMoveType, eiMetadata.getMeta("fdMoveType")));	
			map.put("fdStatus",StringUtils.toString(fdStatus, eiMetadata.getMeta("fdStatus")));	
			map.put("fdStockMaoertuo",StringUtils.toString(fdStockMaoertuo, eiMetadata.getMeta("fdStockMaoertuo")));	
			map.put("fdRemark",StringUtils.toString(fdRemark, eiMetadata.getMeta("fdRemark")));	
			map.put("fdStock",StringUtils.toString(fdStock, eiMetadata.getMeta("fdStock")));	
		
		return map;
	
	}
}